﻿<%@ Page Language="C#" MasterPageFile="~/MasterPage2.master" AutoEventWireup="true" CodeFile="KetQuaTimKiem.aspx.cs" Inherits="KetQuaTimKiem" Title="Kết quả tìm kiếm"  %>
<%@ Register TagPrefix="cc1" Namespace="SiteUtils" Assembly="CollectionPager" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <asp:Label runat="server" Visible="false" ID="lbThongBaoKetQuaTimKiem" Width="100%" ></asp:Label><br />
    
        Bấm vào <a href="TimKiemNangCao.aspx"> đây</a> để tìm kiếm chính xác hơn
  
    
    <asp:DataList ID="dtlKetQuaTimKiem" runat="server" RepeatColumns="3">
        <ItemTemplate>
            <asp:HiddenField ID="Hidden" runat="server" Value='<%# Eval("ID") %>' />
            <%
                dtlKetQuaTimKiem.EditItemIndex++;
                HiddenField id = (HiddenField)dtlKetQuaTimKiem.Items[dtlKetQuaTimKiem.EditItemIndex].Controls[0];
                if (BUS.SanPhamBUS.KiemTraSanPhamLaLapTop(int.Parse(id.Value)))
                {
            %>
                    <asp:HyperLink ID="HyperLink1" runat="server" Font-Bold="True" 
                Font-Size="Medium" ForeColor="#0000CC" 
                NavigateUrl='<%# Eval("ID", "ChiTietLapTop.aspx?ID={0}") %>' 
                Text='<%# Eval("TenSanPham") %>'></asp:HyperLink>
                
            <%   
                }
                else
                {
            %>
                 <asp:HyperLink ID="HyperLink2" runat="server" Font-Bold="True" 
                Font-Size="Medium" ForeColor="#0000CC" 
                NavigateUrl='<%# Eval("ID", "ChiTietDienThoai.aspx?ID={0}") %>' 
                Text='<%# Eval("TenSanPham") %>'></asp:HyperLink>
                
                <%}%>
           
            
            <br />
            <br />
            <asp:Image ID="Image3" runat="server" Height="150px" 
                ImageUrl='<%# Eval("HinhSanPham","~/Image/{0}") %>' Width="175px" />
            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
            <br />
            <br />
            <asp:Label ID="Label2" runat="server" Font-Italic="False" Font-Size="Medium" 
                ForeColor="Red" Text='<%# "Giá  bán :  " + Eval("GiaBanHienTai") + "VNĐ" %>'></asp:Label>
            <br />
            <br />
            <br />
        </ItemTemplate>
</asp:DataList>

<CC1:COLLECTIONPAGER id="CollectionPager3" runat="server" BackText="« Trang Trước" 
        FirstText="Đầu Tiên" LabelText="Trang :" LastText="Sau Cùng" 
        NextText="Trang Sau »" 
        ResultsFormat="Hiển Thị  Kết Quả Trang {0}-{1} (Tổng Số {2})">
    </CC1:COLLECTIONPAGER> 

</asp:Content>
